/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mvc.asociaciones;

import com.gestores.GestionAsociaciones;
import com.mvc.RequestHandler;
import java.io.IOException;
import java.util.ArrayList;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author victor
 */
public class VerListado implements RequestHandler{

    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, NamingException {
        String sHistorica=request.getParameter("historica");
        boolean historica=false;
        if(sHistorica!=null && sHistorica.equalsIgnoreCase("SI")){
            historica=true;
        }
        String sFiltro=request.getParameter("filtro");
        if(sFiltro==null)sFiltro="";
        
        ArrayList lista=GestionAsociaciones.getInstance().listaAsociaciones(sFiltro,historica);
        request.setAttribute("lista", lista);
    }

}
